﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame1.Extensions
{
    public static class RandomExtensions
    {
        /// <summary>
        /// Next inclusive
        /// </summary>
        /// <param name="rnd"></param>
        /// <returns></returns>
        public static int NextI(this Random rnd,int minValue, int maxValue)
        {
            return rnd.Next(minValue, maxValue + 1);
        }
        public static int NextI(this Random rnd,int maxValue)
        {
            return rnd.Next(maxValue + 1);
        }
        public static int NextSign(this Random rnd)
        {
            return rnd.NextI(1) > 0 ? 1 : -1;
        }
        public static bool NextBool(this Random rnd)
        {
            return rnd.NextI(0, 1) > 0;
        }
        
    }
}
